import Cookies from "js-cookie";
// 变量
const tokenKey = "tokenAdmin";
const userInfoKey = "userinfo";

// 获取token
export function getToken(){ return Cookies.get(tokenKey); }
// 写入token
export function setToken(value){ Cookies.set(tokenKey, value); }
// 删除token
export function removeToken(){ Cookies.remove(tokenKey); }

// 获取用户信息
export function getUserinfo(){ return Cookies.get(userInfoKey); }
// 写入用户信息
export function setUserinfo(value){ Cookies.set(userInfoKey, value); }
// 删除用户信息
export function removeUserinfo(){ Cookies.remove(userInfoKey); }
